#ifndef GRAFICOBARRAS
#define GRAFICOBARRAS

#include <QtGui>
#include <QtOpenGL>
using std::string;
using std::vector;

class GraficoBarras : public QGLWidget{
	Q_OBJECT
	
	private:
		vector<float> dados;
		float larguraBarras;
		float valorMaximo;
		float valorMinimo;
		float width, height;
		
		float scaleValue(float value, float min, float max, float newMin, float newMax);
		void drawRectangle( int x0, int y0, int x1, int y1 );
	public:
		GraficoBarras( vector<float>& dados, QWidget* parent = 0 );
		
	protected:
		void initializeGL();
		void resizeGL( int w, int h );
		void paintGL();
		
};

#endif
